<?php
namespace Modules\SqlQeneratorApi\Http\Controllers\v1;
use Illuminate\Http\Request;
use Modules\SqlQeneratorApi\Http\service\QueryAataTablesService;
use Modules\SqlQeneratorApi\Http\service\ViewTableFieldService;

class IndexController extends CommonController
{
	/**
	 * @Name  查询数据库表
	 * @Description
	 * @Author 宋博
	 * @Date 2021/5/18 11:07
	 * @Method GET
	 * @Return Json
	 */
    public function getQueryDataTables()
    {
        return (new QueryAataTablesService())->index();
    }
    /**
     * @Name 查看表字段
     * @Description
     * @Author 宋博
     * @Date 2021/5/18 11:17
     * @Method GET
     * @Param  tableName  String  表名
     * @Param tableComment  String  表备注
     * @Return Json
     */
    public function getViewTableField(Request $request){
        return (new ViewTableFieldService())->index($request->all());
    }
}
